<template>
  <div>
    <van-divider :style="{ color: '#323232', borderColor: '#CCCCCC', padding: '0 30%' }">
      常见问题
    </van-divider>
    <div class="commonissue">
      <ul>
        <li v-for="(item, index) in res.issue" :key="index">
          <span>{{ item.question }}</span>
          <p>{{ item.answer }}</p>
        </li>
      </ul>
    </div>
  </div>

  <div class="aaa">
    <van-divider :style="{
      color: '#323232',
      borderColor: '#CCCCCC',
      padding: '0 30%',
      margin: '25px 0 16px 0',
      size: '100px',
    }" hairline:true>
      大家都在看
    </van-divider>
    <div class="relatedGoodssee">
      <van-grid :column-num="2">
        <van-grid-item v-for="item in res.relatedGoods" :key="item">
          <van-image :src="item.picUrl" style="width: 100%; height: 100%" />
          <p>{{ item.name }}</p>
          <span>￥{{ item.retailPrice }}</span>
        </van-grid-item>
      </van-grid>
    </div>
  </div>
</template>
<style scoped :src="procss"></style>
<script>
import { IComment } from "../api/request.js";
import procss from "../assets/css/ProductInformation.css";
export default {
  name: "ProductInformation",
  data() {
    return {
      id: this.$store.state.goodsid,
      res: {},
    };
  },
  mounted() {
    //获取商品详情信息
    IComment("/wx/goods/detail", {
      params: {
        id: this.$store.state.goodsid,
      }
    }).then(response => {
      this.res = response;
    });
  },

};
</script>
